import Mock from 'mockjs';

Mock.mock('/api/management/config/fetch_user_list', 'get', () => {
    return Mock.mock ({
        code: 10001,
        data: {
            '1|1-6': [
                {
                    position: '@name',
                    'roles|1': ['工人', '文员', '司机'],
                    user_name: '@name'
                }
            ],
            '146837|1-5': [
                {
                    position: '@name',
                    'roles|1': ['工人', '文员', '司机'],
                    user_name: '@name'
                }
            ],
            '146838|1-3': [
                {
                    position: '@name',
                    'roles|1': ['工人', '文员', '司机'],
                    user_name: '@name'
                }
            ]
        }
    })
});

Mock.mock('/api/management/config/fetch_org_list', 'get', () => {
    return Mock.mock ({
        code: 10001,
        data: [
            {
                child: [
                    {
                        child: [
                            {
                                id: '146837', parent_id: '146838', org_name: '@name', child: []
                            }
                        ],
                        id: '146838',
                        org_name: '@name',
                        parent_id: '1'
                    }
                ],
                id: 1,
                org_name: '@name',
                parent_id: 0
            }
        ]
    })
});
